home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / nethack3 / patch6d < prev    next >
Encoding:
Internet Message Format  |  1989-11-27  |  58.0 KB

  1. Path: uunet!zephyr.ens.tek.com!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v08i057:  NetHack3 -  display oriented dungeons & dragons (Ver. 3.0), Patch6d
  5. Message-ID: <4846@tekred.CNA.TEK.COM>
  6. Date: 22 Nov 89 19:47:48 GMT
  7. Sender: nobody@tekred.CNA.TEK.COM
  8. Lines: 2278
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Izchak Miller <izchak@linc.cis.upenn.edu>
  12. Posting-number: Volume 8, Issue 57
  13. Archive-name: NetHack3/Patch6d
  14. Patch-To: NetHack3: Volume 7, Issue 56-93
  15.  
  16.  
  17.  
  18. #! /bin/sh
  19. # This is a shell archive.  Remove anything before this line, then unpack
  20. # it by saving it into a file and typing "sh file".  To overwrite existing
  21. # files, type "sh file -c".  You can also feed this as standard input via
  22. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  23. # will see the following message at the end:
  24. #        "End of archive 4 (of 15)."
  25. # Contents:  patches06j
  26. # Wrapped by billr@saab on Wed Nov 22 10:50:08 1989
  27. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  28. if test -f 'patches06j' -a "${1}" != "-c" ; then 
  29.   echo shar: Will not clobber existing file \"'patches06j'\"
  30. else
  31. echo shar: Extracting \"'patches06j'\" \(55338 characters\)
  32. sed "s/^X//" >'patches06j' <<'END_OF_FILE'
  33. X*** src/Old/pager.c    Sun Nov 19 13:04:16 1989
  34. X--- src/pager.c    Fri Nov 17 19:32:03 1989
  35. X***************
  36. X*** 1,4 ****
  37. X! /*    SCCS Id: @(#)pager.c    3.0    88/10/25 */
  38. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  39. X  /* NetHack may be freely redistributed.  See license for details. */
  40. X  
  41. X--- 1,4 ----
  42. X! /*    SCCS Id: @(#)pager.c    3.0    89/11/15
  43. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  44. X  /* NetHack may be freely redistributed.  See license for details. */
  45. X  
  46. X***************
  47. X*** 8,14 ****
  48. X  
  49. X  /* block some unused #defines to avoid overloading some cpp's */
  50. X  #define MONATTK_H
  51. X! #include     "hack.h"
  52. X  
  53. X  #ifndef NO_SIGNAL
  54. X  #include <signal.h>
  55. X--- 8,14 ----
  56. X  
  57. X  /* block some unused #defines to avoid overloading some cpp's */
  58. X  #define MONATTK_H
  59. X! #include    "hack.h"
  60. X  
  61. X  #ifndef NO_SIGNAL
  62. X  #include <signal.h>
  63. X***************
  64. X*** 23,38 ****
  65. X  
  66. X  static char hc = 0;
  67. X  
  68. X! static void page_more();
  69. X! static boolean clear_help P((CHAR_P));
  70. X! static boolean valid_help P((CHAR_P));
  71. X  
  72. X  int
  73. X  dowhatis()
  74. X  {
  75. X      FILE *fp;
  76. X      char bufr[BUFSZ+6];
  77. X!     register char *buf = &bufr[6], *ep, q;
  78. X  #ifdef OS2_CODEVIEW
  79. X      char tmp[PATHLEN];
  80. X  
  81. X--- 23,70 ----
  82. X  
  83. X  static char hc = 0;
  84. X  
  85. X! static void FDECL(page_more, (FILE *,int));
  86. X! static boolean FDECL(clear_help, (CHAR_P));
  87. X! static boolean FDECL(valid_help, (CHAR_P));
  88. X  
  89. X+ /*
  90. X+  * print out another possibility for dowhatis. "new" is the possible new
  91. X+  * string; "out_flag" indicates whether we really want output, and if
  92. X+  * so what kind of output: 0 == no output, 1 == "(or %s)" output. 
  93. X+  * Returns TRUE if this new string wasn't the last string printed.
  94. X+  */
  95. X+ 
  96. X+ static boolean
  97. X+ outspec(new, out_flag)
  98. X+ char *new;
  99. X+ int out_flag;
  100. X+ {
  101. X+     static char old[50];
  102. X+ 
  103. X+     if (!strcmp(old, new))
  104. X+         return FALSE;        /* don't print the same thing twice */
  105. X+ 
  106. X+     if (out_flag)
  107. X+         pline("(or %s)", new);
  108. X+ 
  109. X+     Strcpy(old, new);
  110. X+     return 1;
  111. X+ }
  112. X+ 
  113. X  int
  114. X  dowhatis()
  115. X  {
  116. X      FILE *fp;
  117. X      char bufr[BUFSZ+6];
  118. X!     register char *buf = &bufr[6], *ep;
  119. X!     uchar q, typ;
  120. X!     register int i;
  121. X!     coord    cc;
  122. X!     boolean oldverb = flags.verbose;
  123. X!     boolean found_in_file = FALSE;
  124. X!     int    found = 0;
  125. X!     register struct monst *mtmp;
  126. X! 
  127. X  #ifdef OS2_CODEVIEW
  128. X      char tmp[PATHLEN];
  129. X  
  130. X***************
  131. X*** 43,247 ****
  132. X  #else
  133. X      fp = fopen(DATAFILE, "r");
  134. X  #endif
  135. X!     if(!fp)
  136. X  #ifdef MACOS
  137. X!         fp = openFile(DATAFILE);
  138. X!     if (!fp)
  139. X  #endif
  140. X          pline("Cannot open data file!");
  141. X!     else {
  142. X!         coord    cc;
  143. X!         uchar    r;
  144. X!         boolean oldverb = flags.verbose;
  145. X  
  146. X!         pline ("Specify unknown object by cursor? ");
  147. X!         q = ynq();
  148. X!         if (q == 'q') {
  149. X!             (void) fclose(fp);
  150. X!             return 0;
  151. X!         } else if (q == 'n') {
  152. X!             cc.x = cc.y = -1;
  153. X!             pline("Specify what? ");
  154. X!             r = readchar();
  155. X!         } else {
  156. X!             cc.x = u.ux;
  157. X!             cc.y = u.uy;
  158. X!     selobj:
  159. X!             if(flags.verbose)
  160. X              pline("Please move the cursor to an unknown object.");
  161. X!             else
  162. X              pline("Pick an object.");
  163. X!             getpos(&cc, FALSE, "an unknown object");
  164. X!             if (cc.x < 0) {
  165. X                  (void) fclose(fp); /* sweet@scubed */
  166. X                  flags.verbose = oldverb;
  167. X                  return 0;
  168. X-             }
  169. X-             flags.verbose = FALSE;
  170. X-             r = levl[cc.x][cc.y].scrsym;
  171. X-             if (!r || !levl[cc.x][cc.y].seen) r = ' ';
  172. X          }
  173. X  
  174. X! #define conv_sym(x)    if(r == showsyms.x) q = defsyms.x
  175. X!         conv_sym(stone);
  176. X!         else conv_sym(vwall);
  177. X!         else conv_sym(hwall);
  178. X!         else conv_sym(tlcorn);
  179. X!         else conv_sym(trcorn);
  180. X!         else conv_sym(blcorn);
  181. X!         else conv_sym(brcorn);
  182. X!         else conv_sym(crwall);
  183. X!         else conv_sym(tuwall);
  184. X!         else conv_sym(tdwall);
  185. X!         else conv_sym(tlwall);
  186. X!         else conv_sym(trwall);
  187. X!         else conv_sym(door);
  188. X!         else conv_sym(room);
  189. X!         else conv_sym(corr);
  190. X!         else conv_sym(upstair);
  191. X!         else conv_sym(dnstair);
  192. X!         else conv_sym(trap);
  193. X!         else conv_sym(web); 
  194. X!         else conv_sym(pool);
  195. X! #ifdef FOUNTAINS
  196. X!         else conv_sym(fountain);
  197. X! #endif
  198. X! #ifdef SINKS
  199. X!         else conv_sym(sink);
  200. X! #endif
  201. X! #ifdef THRONES
  202. X!         else conv_sym(throne);
  203. X! #endif
  204. X! #ifdef ALTARS
  205. X!         else conv_sym(altar);
  206. X! #endif
  207. X! #ifdef STRONGHOLD
  208. X!         else conv_sym(upladder);
  209. X!         else conv_sym(dnladder);
  210. X!         else conv_sym(dbvwall);
  211. X!         else conv_sym(dbhwall);
  212. X! #endif
  213. X! #undef conv_sym
  214. X!         else {
  215. X!             q = r;
  216. X!             if (index(quitchars, q)) {
  217. X!                 (void) fclose(fp); /* sweet@scubed */
  218. X!                 flags.verbose = oldverb;
  219. X!                 return 0;
  220. X!             }
  221. X!         }
  222. X  
  223. X!         if(q != '\t')
  224. X!         while(fgets(buf,BUFSZ,fp))
  225. X!             if(*buf == q) {
  226. X              ep = index(buf, '\n');
  227. X              if(ep) *ep = 0;
  228. X              /* else: bad data file */
  229. X              /* Expand tab 'by hand' */
  230. X!             if(buf[1] == '\t'){
  231. X                  buf = bufr;
  232. X!                 buf[0] = r;
  233. X                  (void) strncpy(buf+1, "       ", 7);
  234. X              }
  235. X!             /* use %s so '%' won't be interpreted as a format */
  236. X!             pline("%s", buf);
  237. X!             if(cc.x != -1) {
  238. X!                 register struct monst *mtmp;
  239. X  
  240. X!                 if(MON_AT(cc.x,cc.y))
  241. X!                 mtmp = m_at(cc.x,cc.y);
  242. X!                 else
  243. X!                 mtmp = (struct monst *) 0;
  244. X! #ifdef ALTARS
  245. X!                 if (r == showsyms.altar && q == defsyms.altar &&
  246. X!                 (IS_ALTAR(levl[cc.x][cc.y].typ) ||
  247. X!                  (mtmp && mtmp->mimic))
  248. X!                    ) {
  249. X!                     int type = levl[cc.x][cc.y].altarmask &
  250. X!                         ~A_SHRINE;
  251. X!                     pline((type == A_CHAOS) ? "(chaotic)" :
  252. X!                       (type == A_NEUTRAL) ? "(neutral)" :
  253. X!                       "(lawful)");
  254. X!                 } else
  255. X! #endif
  256. X!                 if (q == CHAIN_SYM && OBJ_AT(cc.x, cc.y))
  257. X!                     pline("(chain)");
  258. X!                 else if (r == showsyms.door && q == defsyms.door &&
  259. X!                 (IS_DOOR(levl[cc.x][cc.y].typ) ||
  260. X!                  (mtmp && mtmp->mimic))) {
  261. X!                 /* Note: this will say mimics in walls are
  262. X!                  *     closed doors, which we want.
  263. X!                  */
  264. X!                 switch(levl[cc.x][cc.y].doormask & ~D_TRAPPED) {
  265. X!                     case D_NODOOR: pline("(doorway)"); break;
  266. X!                     case D_BROKEN: pline("(broken door)"); break;
  267. X!                     case D_ISOPEN: pline("(open door)"); break;
  268. X!                     default:       pline("(closed door)"); break;
  269. X!                            /* locked or not */
  270. X!                 }
  271. X!                 }
  272. X! #ifdef SPELLS
  273. X!                 else if (q == SPBOOK_SYM && OBJ_AT(cc.x, cc.y))
  274. X!                     pline("(spellbook)");
  275. X! #endif
  276. X! #ifdef STRONGHOLD
  277. X!                 else
  278. X!                 if (((r == showsyms.dbvwall && q == defsyms.dbvwall) ||
  279. X!                  (r == showsyms.dbvwall && q == defsyms.dbvwall)) &&
  280. X!                 is_db_wall(cc.x,cc.y))
  281. X!                     pline("(raised drawbridge)");
  282. X! #endif
  283. X! #ifdef SINKS
  284. X!                 else if (r == showsyms.sink && q == defsyms.sink &&
  285. X!                 IS_SINK(levl[cc.x][cc.y].typ))
  286. X!                     pline("(sink)");
  287. X! #endif
  288. X!                 if (!Invisible 
  289. X  #ifdef POLYSELF
  290. X                  && !u.uundetected
  291. X  #endif
  292. X!                     && u.ux==cc.x && u.uy==cc.y) {
  293. X!                 pline("(%s named %s)",
  294. X  #ifdef POLYSELF
  295. X!                     u.mtimedone ? mons[u.umonnum].mname :
  296. X  #endif
  297. X!                     pl_character, plname);
  298. X!                 /* Note: the blind/telepathy check is necessary.
  299. X!                  * Otherwise a ghost sitting on a blank square
  300. X!                  * gets identified even while blind because the
  301. X!                  * symbol is "correct".
  302. X!                  */
  303. X!                 } else if (mtmp && (!Blind || Telepat)) {
  304. X!                 if (q == mtmp->data->mlet)
  305. X!                     pline("(%s%s)",
  306. X!                     mtmp->mtame ? "tame " :
  307. X!                       mtmp->mpeaceful ? "peaceful " : "",
  308. X!                     strncmp(lmonnam(mtmp), "the ", 4)
  309. X!                       ? lmonnam(mtmp) : lmonnam(mtmp)+4);
  310. X!                 }
  311. X!             }
  312. X!             if(ep[-1] == ';') {
  313. X!                 pline("More info? ");
  314. X!                 if(yn() == 'y') {
  315. X!                     page_more(fp,1); /* does fclose() */
  316. X!                     flags.verbose = oldverb;
  317. X!                     return 0;
  318. X!                 }
  319. X!             }
  320. X!             if(cc.x != -1) {
  321. X!                 buf = &bufr[6];
  322. X!                 more();
  323. X!                 rewind(fp);
  324. X!                 goto selobj;
  325. X              }
  326. X!             (void) fclose(fp);     /* kopper@psuvax1 */
  327. X              flags.verbose = oldverb;
  328. X              return 0;
  329. X!             }
  330. X!         pline("I've never heard of such things.");
  331. X!         (void) fclose(fp);
  332. X!         flags.verbose = oldverb;
  333. X      }
  334. X      return 0;
  335. X  }
  336. X  
  337. X--- 75,264 ----
  338. X  #else
  339. X      fp = fopen(DATAFILE, "r");
  340. X  #endif
  341. X!     if(!fp) {
  342. X  #ifdef MACOS
  343. X!         fp = openFile(DATAFILE, "r");
  344. X!     }
  345. X!     if (!fp) {
  346. X  #endif
  347. X          pline("Cannot open data file!");
  348. X!         return 0;
  349. X!     }
  350. X  
  351. X!     pline ("Specify unknown object by cursor? ");
  352. X!     q = ynq();
  353. X!     if (q == 'q') {
  354. X!         (void) fclose(fp);
  355. X!         return 0;
  356. X!     } else if (q == 'n') {
  357. X!         cc.x = cc.y = -1;
  358. X!         pline("Specify what? ");
  359. X!         q = readchar();
  360. X!     } else {
  361. X!         cc.x = u.ux;
  362. X!         cc.y = u.uy;
  363. X! selobj:
  364. X!         found_in_file = FALSE;
  365. X!         found = 0;
  366. X!         (void) outspec("", 0);        /* reset output */
  367. X!         if(flags.verbose)
  368. X              pline("Please move the cursor to an unknown object.");
  369. X!         else
  370. X              pline("Pick an object.");
  371. X!         getpos(&cc, FALSE, "an unknown object");
  372. X!         if (cc.x < 0) {
  373. X                  (void) fclose(fp); /* sweet@scubed */
  374. X                  flags.verbose = oldverb;
  375. X                  return 0;
  376. X          }
  377. X+         flags.verbose = FALSE;
  378. X+         q = levl[cc.x][cc.y].scrsym;
  379. X+         if (!q || (!levl[cc.x][cc.y].seen && !MON_AT(cc.x,cc.y)))
  380. X+             q = ' ';
  381. X+     }
  382. X  
  383. X!     if (index(quitchars, (char)q)) {
  384. X!         (void) fclose(fp); /* sweet@scubed */
  385. X!         flags.verbose = oldverb;
  386. X!         return 0;
  387. X!     }
  388. X  
  389. X! /* now check for symbols defined in the data file */
  390. X!     if(q != '\t')
  391. X!     while(fgets(buf,BUFSZ,fp)) {
  392. X!         if(*buf == q) {
  393. X              ep = index(buf, '\n');
  394. X              if(ep) *ep = 0;
  395. X              /* else: bad data file */
  396. X              /* Expand tab 'by hand' */
  397. X!             if (buf[1] == '\t') {
  398. X                  buf = bufr;
  399. X!                 buf[0] = q;
  400. X                  (void) strncpy(buf+1, "       ", 7);
  401. X              }
  402. X!             pline("%s", buf);    /* watch out for % in output */
  403. X!             (void) outspec("", 0);
  404. X!             found++;
  405. X!             found_in_file = TRUE;
  406. X!             break;
  407. X!         }
  408. X!     }
  409. X! 
  410. X! /* Now check for graphics symbols */
  411. X!     for (i = 0; i < MAXPCHARS; i++) {
  412. X!         if ( q == showsyms[i] && (*explainsyms[i])) {
  413. X!             if (!found) {
  414. X!                 pline("%c       %s",q,explainsyms[i]);
  415. X!                 (void) outspec(explainsyms[i], 0);
  416. X!                 found++;
  417. X!             }
  418. X!             else if (outspec(explainsyms[i], 1))
  419. X!                 found++;
  420. X!         }
  421. X!     }
  422. X  
  423. X!     if (!found)
  424. X!         pline("I've never heard of such things.");
  425. X! 
  426. X! /* now check for specific things at a given location */
  427. X!     if(cc.x != -1 && found) {
  428. X!         if(MON_AT(cc.x,cc.y)) {
  429. X!             mtmp = m_at(cc.x,cc.y);
  430. X!             if (!showmon(mtmp) || Hallucination)
  431. X!                 mtmp = (struct monst *)0;
  432. X!         } else
  433. X!             mtmp = (struct monst *) 0;
  434. X!         typ = levl[cc.x][cc.y].typ;
  435. X!         if (!Invisible 
  436. X  #ifdef POLYSELF
  437. X                  && !u.uundetected
  438. X  #endif
  439. X!                 && u.ux==cc.x && u.uy==cc.y) {
  440. X!             pline("(%s named %s)",
  441. X  #ifdef POLYSELF
  442. X!                 u.mtimedone ? mons[u.umonnum].mname :
  443. X  #endif
  444. X!                 pl_character, plname);
  445. X!         } else if (mtmp && !mtmp->mimic)
  446. X!             pline("(%s%s)",
  447. X!                mtmp->mtame ? "tame " :
  448. X!                mtmp->mpeaceful ? "peaceful " : "",
  449. X!                strncmp(lmonnam(mtmp), "the ", 4)
  450. X!                   ? lmonnam(mtmp) : lmonnam(mtmp)+4);
  451. X! /* Only worry about the rest of the cases if the symbol could represent
  452. X!    more than one thing */
  453. X!         else if (found <= 1)
  454. X!             /* do nothing */ ;
  455. X!         else if (!levl[cc.x][cc.y].seen)
  456. X!             pline("(a dark part of a room)");
  457. X! #ifdef ALTARS
  458. X!         else if (q == showsyms[S_altar] && 
  459. X!              (IS_ALTAR(typ) || (mtmp && mtmp->mimic))) {
  460. X!             int kind = levl[cc.x][cc.y].altarmask & ~A_SHRINE;
  461. X!             pline( "(%s altar)",
  462. X!                 (kind == A_CHAOS) ? "chaotic" :
  463. X!                 (kind == A_NEUTRAL) ? "neutral" :
  464. X!                  "lawful" );
  465. X!         }
  466. X! #endif
  467. X!         else if ((q==showsyms[S_ndoor] ||
  468. X!               q==showsyms[S_vodoor] ||
  469. X!               q==showsyms[S_hodoor] ||
  470. X!               q==showsyms[S_cdoor]) &&
  471. X!             (IS_DOOR(typ) ||
  472. X!                 (IS_WALL(typ) && mtmp && mtmp->mimic))) {
  473. X!             /* Note: this will say mimics in walls are
  474. X!              *     closed doors, which we want.
  475. X!              */
  476. X!             switch(levl[cc.x][cc.y].doormask & ~D_TRAPPED) {
  477. X!                 case D_NODOOR: pline("(doorway)"); break;
  478. X!                 case D_BROKEN: pline("(broken door)"); break;
  479. X!                 case D_ISOPEN: pline("(open door)"); break;
  480. X!                 default:       pline("(closed door)"); break;
  481. X!                            /* locked or not */
  482. X              }
  483. X!         }
  484. X! #ifdef STRONGHOLD
  485. X!         else if ((q == showsyms[S_dbvwall] ||
  486. X!               q == showsyms[S_dbhwall]) &&
  487. X!               is_db_wall(cc.x,cc.y))
  488. X!                 pline("(raised drawbridge)");
  489. X! #endif
  490. X! #ifdef SINKS
  491. X!         else if (q == showsyms[S_sink] && IS_SINK(levl[cc.x][cc.y].typ))
  492. X!             pline("(sink)");
  493. X! #endif
  494. X!         else if (IS_ROOM(typ) && q == showsyms[S_room])
  495. X!             pline("(floor of a room)");
  496. X!         else if (q == showsyms[S_corr] && SPACE_POS(typ))
  497. X!             pline("(corridor)");
  498. X!         else if (!ACCESSIBLE(typ)) {
  499. X!             if (q == showsyms[S_stone] || q == ' ')
  500. X!                 pline("(dark part of a room)");
  501. X!             else
  502. X!                 pline("(wall)");
  503. X!         }
  504. X!     }
  505. X! 
  506. X! /* now check for "more info" */
  507. X!     if(found_in_file && ep[-1] == ';') {
  508. X!         pline("More info? ");
  509. X!         if(yn() == 'y') {
  510. X!             page_more(fp,1); /* does fclose() */
  511. X              flags.verbose = oldverb;
  512. X              return 0;
  513. X!         }
  514. X!     }
  515. X! 
  516. X! /* if specified by cursor, keep going */
  517. X!     if(cc.x != -1) {
  518. X!         buf = &bufr[6];
  519. X!         more();
  520. X!         rewind(fp);
  521. X!         goto selobj;
  522. X      }
  523. X+     (void) fclose(fp);     /* kopper@psuvax1 */
  524. X+     flags.verbose = oldverb;
  525. X      return 0;
  526. X  }
  527. X  
  528. X***************
  529. X*** 261,267 ****
  530. X  #else
  531. X  # ifdef MACOS
  532. X      if(!(fp = fopen(CMDHELPFILE, "r")))
  533. X!         fp = openFile(CMDHELPFILE);
  534. X      if (!fp) {
  535. X  # else
  536. X      if(!(fp = fopen(CMDHELPFILE, "r"))) {
  537. X--- 278,284 ----
  538. X  #else
  539. X  # ifdef MACOS
  540. X      if(!(fp = fopen(CMDHELPFILE, "r")))
  541. X!         fp = openFile(CMDHELPFILE, "r");
  542. X      if (!fp) {
  543. X  # else
  544. X      if(!(fp = fopen(CMDHELPFILE, "r"))) {
  545. X***************
  546. X*** 659,666 ****
  547. X--- 676,700 ----
  548. X       * help menu, we end up restoring the part of the maze underneath the
  549. X       * help menu when the last page of a long help file is displayed with
  550. X       * an external pager.
  551. X+      *
  552. X+      * When whole_screen is FALSE and the internal pager is used, the
  553. X+      * screen is big enough so that the maze is left in place during paging
  554. X+      * and the paging occurs in the lower part of the screen.  In this case
  555. X+      * the pager clears out the part it wrote over when it exits but it
  556. X+      * doesn't redraw the whole screen.  So all characters require that
  557. X+      * the help menu be cleared.
  558. X+      *
  559. X+      * When an external pager is used, the screen is always cleared.
  560. X+      * However, the "f" and "h" help options always use the internal
  561. X+      * pager even if DEF_PAGER is defined.
  562. X+      *                        - Bob Wilber  wilber@homxb.att.com  10/20/89
  563. X       */
  564. X      return(index(quitchars,c) || c == 'd' || c == 'e'
  565. X+ #ifdef DEF_PAGER
  566. X+             || (!whole_screen && (c == 'f' || c == 'h'))
  567. X+ #else
  568. X+             || !whole_screen
  569. X+ #endif
  570. X  #ifdef WIZARD
  571. X          || c == 'j'
  572. X  #endif
  573. X***************
  574. X*** 763,769 ****
  575. X  #else
  576. X  # ifdef MACOS
  577. X      if ((f = fopen (fnam, "r")) == (FILE *) 0)
  578. X!         f = openFile(fnam);
  579. X      /* refresh screen kluge */
  580. X      if (!f) {
  581. X          cls();
  582. X--- 797,803 ----
  583. X  #else
  584. X  # ifdef MACOS
  585. X      if ((f = fopen (fnam, "r")) == (FILE *) 0)
  586. X!         f = openFile(fnam, "r");
  587. X      /* refresh screen kluge */
  588. X      if (!f) {
  589. X          cls();
  590. X*** src/Old/panic.c    Sun Nov 19 13:04:49 1989
  591. X--- src/panic.c    Fri Nov 17 19:32:04 1989
  592. X***************
  593. X*** 1,4 ****
  594. X! /*    SCCS Id: @(#)panic.c    3.0    88/05/03
  595. X   * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985.
  596. X   *
  597. X   *    This code was adapted from the code in end.c to run in a standalone
  598. X--- 1,4 ----
  599. X! /*    SCCS Id: @(#)panic.c    3.0    89/11/15
  600. X   * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985.
  601. X   *
  602. X   *    This code was adapted from the code in end.c to run in a standalone
  603. X***************
  604. X*** 12,18 ****
  605. X  
  606. X  #ifdef MSDOS
  607. X  #undef exit
  608. X! extern void exit P((int));
  609. X  #endif
  610. X  #ifdef AZTEC
  611. X  #define abort() exit()
  612. X--- 12,18 ----
  613. X  
  614. X  #ifdef MSDOS
  615. X  #undef exit
  616. X! extern void FDECL(exit, (int));
  617. X  #endif
  618. X  #ifdef AZTEC
  619. X  #define abort() exit()
  620. X***************
  621. X*** 44,47 ****
  622. X      exit(1);        /* redundant */
  623. X      return;
  624. X  }
  625. X- 
  626. X--- 44,46 ----
  627. X*** src/Old/pickup.c    Sun Nov 19 13:05:04 1989
  628. X--- src/pickup.c    Tue Nov 14 21:24:39 1989
  629. X***************
  630. X*** 33,49 ****
  631. X      dummygold.cobj = 0;
  632. X  
  633. X      if(Levitation) {
  634. X!         if (all && !flags.pickup) read_engr_at(u.ux,u.uy);
  635. X          return;
  636. X      }
  637. X!     if (all && !flags.pickup) {
  638. X          int ct = 0;
  639. X  
  640. X!         for (obj = fobj; obj; obj = obj->nobj)
  641. X!             if(obj->ox == u.ux && obj->oy == u.uy)
  642. X!                 if(!obj->cobj)
  643. X!                 if (obj != uchain)
  644. X!                     ct++;
  645. X  
  646. X          /* Stop on a zorkmid */
  647. X          if (gold) ct++;
  648. X--- 33,47 ----
  649. X      dummygold.cobj = 0;
  650. X  
  651. X      if(Levitation) {
  652. X!         if (multi || (all && !flags.pickup)) read_engr_at(u.ux,u.uy);
  653. X          return;
  654. X      }
  655. X!     if (multi || (all && !flags.pickup)) {
  656. X          int ct = 0;
  657. X  
  658. X!         for (obj = level.objects[u.ux][u.uy]; obj; obj = obj->nexthere)
  659. X!             if(!obj->cobj && obj != uchain)
  660. X!                 ct++;
  661. X  
  662. X          /* Stop on a zorkmid */
  663. X          if (gold) ct++;
  664. X***************
  665. X*** 209,215 ****
  666. X            if(obj->blessed) obj->blessed = 0;
  667. X            else if(!obj->spe && !obj->cursed) obj->spe = 1;
  668. X            else {
  669. X!             pline("The scroll turns to dust as you pick it up.");
  670. X              if(!(objects[SCR_SCARE_MONSTER].oc_name_known) &&
  671. X                 !(objects[SCR_SCARE_MONSTER].oc_uname))
  672. X                  docall(obj);
  673. X--- 207,215 ----
  674. X            if(obj->blessed) obj->blessed = 0;
  675. X            else if(!obj->spe && !obj->cursed) obj->spe = 1;
  676. X            else {
  677. X!             pline("The scroll%s turn%s to dust as you pick %s up.",
  678. X!                 plur((long)obj->quan), (obj->quan==1) ? "s":"",
  679. X!                 (obj->quan==1) ? "it" : "them");
  680. X              if(!(objects[SCR_SCARE_MONSTER].oc_name_known) &&
  681. X                 !(objects[SCR_SCARE_MONSTER].oc_uname))
  682. X                  docall(obj);
  683. X***************
  684. X*** 310,319 ****
  685. X          pline("You cannot reach the floor.");
  686. X          return(0);
  687. X      }
  688. X!     if(OBJ_AT(u.ux, u.uy))
  689. X!     for(cobj = fobj; cobj; cobj = cobj->nobj) {
  690. X! 
  691. X!         if(cobj->ox == u.ux && cobj->oy == u.uy)
  692. X          if(Is_container(cobj)) {
  693. X  
  694. X              pline("There is %s here, loot it? ", doname(cobj));
  695. X--- 310,316 ----
  696. X          pline("You cannot reach the floor.");
  697. X          return(0);
  698. X      }
  699. X!     for(cobj = level.objects[u.ux][u.uy]; cobj; cobj = cobj->nexthere) {
  700. X          if(Is_container(cobj)) {
  701. X  
  702. X              pline("There is %s here, loot it? ", doname(cobj));
  703. X***************
  704. X*** 355,365 ****
  705. X  register struct obj *cobj, *obj;
  706. X  {
  707. X      if (cobj->otyp == BAG_OF_HOLDING)
  708. X!         cobj->owt += (obj->owt/2 + 1);
  709. X      else    cobj->owt += obj->owt;
  710. X  }
  711. X  
  712. X! static int
  713. X  in_container(obj)
  714. X  register struct obj *obj;
  715. X  {
  716. X--- 352,365 ----
  717. X  register struct obj *cobj, *obj;
  718. X  {
  719. X      if (cobj->otyp == BAG_OF_HOLDING)
  720. X!         cobj->owt += (obj->cursed?(obj->owt*2):(obj->owt/(obj->blessed?4:2)) + 1);
  721. X      else    cobj->owt += obj->owt;
  722. X  }
  723. X  
  724. X! #ifndef OVERLAY
  725. X! static 
  726. X! #endif
  727. X! int
  728. X  in_container(obj)
  729. X  register struct obj *obj;
  730. X  {
  731. X***************
  732. X*** 431,437 ****
  733. X      return(1);
  734. X  }
  735. X  
  736. X! static int
  737. X  ck_container(obj)
  738. X  register struct obj *obj;
  739. X  {
  740. X--- 431,440 ----
  741. X      return(1);
  742. X  }
  743. X  
  744. X! #ifndef OVERLAY
  745. X! static 
  746. X! #endif
  747. X! int
  748. X  ck_container(obj)
  749. X  register struct obj *obj;
  750. X  {
  751. X***************
  752. X*** 438,450 ****
  753. X      return(obj->cobj == current_container);
  754. X  }
  755. X  
  756. X! static int
  757. X  ck_bag()
  758. X  {
  759. X      return(!baggone);
  760. X  }
  761. X  
  762. X! static int
  763. X  out_container(obj)
  764. X  register struct obj *obj;
  765. X  {
  766. X--- 441,459 ----
  767. X      return(obj->cobj == current_container);
  768. X  }
  769. X  
  770. X! #ifndef OVERLAY
  771. X! static 
  772. X! #endif
  773. X! int
  774. X  ck_bag()
  775. X  {
  776. X      return(!baggone);
  777. X  }
  778. X  
  779. X! #ifndef OVERLAY
  780. X! static 
  781. X! #endif
  782. X! int
  783. X  out_container(obj)
  784. X  register struct obj *obj;
  785. X  {
  786. X*** src/Old/polyself.c    Sun Nov 19 13:05:28 1989
  787. X--- src/polyself.c    Sun Nov 19 09:25:32 1989
  788. X***************
  789. X*** 1,4 ****
  790. X! /*    SCCS Id: @(#)polyself.c    3.0    88/10/22
  791. X  /* Polymorph self routine.  Copyright (C) 1987, 1988, 1989 by Ken Arromdee */
  792. X  /* NetHack may be freely redistributed.  See license for details. */
  793. X  
  794. X--- 1,4 ----
  795. X! /*    SCCS Id: @(#)polyself.c 3.0    89/11/19
  796. X  /* Polymorph self routine.  Copyright (C) 1987, 1988, 1989 by Ken Arromdee */
  797. X  /* NetHack may be freely redistributed.  See license for details. */
  798. X  
  799. X***************
  800. X*** 185,192 ****
  801. X      if (mntmp < 0) {
  802. X          tries = 0;
  803. X          do {
  804. X!             mntmp = rn2(PM_CHAMELEON);
  805. X!             /* All valid monsters are from 0 to PM_CHAMELEON-1 */
  806. X          } while(!polyok(&mons[mntmp]) && tries++ < 200);
  807. X      }
  808. X  
  809. X--- 185,192 ----
  810. X      if (mntmp < 0) {
  811. X          tries = 0;
  812. X          do {
  813. X!             mntmp = rn2(PM_ARCHEOLOGIST);
  814. X!             /* All valid monsters are from 0 to PM_ARCHEOLOGIST-1 */
  815. X          } while(!polyok(&mons[mntmp]) && tries++ < 200);
  816. X      }
  817. X  
  818. X***************
  819. X*** 234,242 ****
  820. X      u.usym = mons[mntmp].mlet;
  821. X  
  822. X      if (tmp != mntmp)
  823. X!         You("turn into a%s %s!",
  824. X!             index(vowels, *(mons[mntmp].mname)) ? "n" : "",
  825. X!             mons[mntmp].mname);
  826. X      else
  827. X          You("feel like a new %s!", mons[mntmp].mname);
  828. X  
  829. X--- 234,240 ----
  830. X      u.usym = mons[mntmp].mlet;
  831. X  
  832. X      if (tmp != mntmp)
  833. X!         You("turn into %s!", an(mons[mntmp].mname));
  834. X      else
  835. X          You("feel like a new %s!", mons[mntmp].mname);
  836. X  
  837. X***************
  838. X*** 300,305 ****
  839. X--- 298,305 ----
  840. X          pline("Use the command #monster to summon help.");
  841. X      if (webmaker(uasmon))
  842. X          pline("Use the command #monster to spin a web.");
  843. X+     if (u.usym == S_UNICORN)
  844. X+         pline("Use the command #monster to use your horn.");
  845. X      if (lays_eggs(uasmon) || u.umonnum == PM_QUEEN_BEE)
  846. X          pline("Use the command #sit to lay an egg.");
  847. X      find_ac();
  848. X***************
  849. X*** 366,372 ****
  850. X        }
  851. X        if (otmp = uarmf) {
  852. X             Your("boots %s off your feet!",
  853. X!             verysmall(uasmon) ? "slide" : "get pushed");
  854. X             (void) Boots_off();
  855. X             dropx(otmp);
  856. X        }
  857. X--- 366,372 ----
  858. X        }
  859. X        if (otmp = uarmf) {
  860. X             Your("boots %s off your feet!",
  861. X!             verysmall(uasmon) ? "slide" : "are pushed");
  862. X             (void) Boots_off();
  863. X             dropx(otmp);
  864. X        }
  865. X***************
  866. X*** 638,643 ****
  867. X--- 638,644 ----
  868. X  
  869. X  char *
  870. X  body_part(part)
  871. X+ int part;
  872. X  {
  873. X      /* Note: it is assumed these will never be >22 characters long,
  874. X       * plus the trailing null, after pluralizing (since sometimes a
  875. X***************
  876. X*** 669,675 ****
  877. X          "minor current", "lower current", "swirl", "swirled",
  878. X          "central core", "lower current", "addled", "center",
  879. X          "edge" },
  880. X!     *snake_parts[] = { "vestigal limb", "eye", "face", "large scale",
  881. X          "large scale tip", "rear region", "scale gap", "scale gapped",
  882. X          "head", "rear region", "light headed", "neck", "rear scale" };
  883. X      
  884. X--- 670,676 ----
  885. X          "minor current", "lower current", "swirl", "swirled",
  886. X          "central core", "lower current", "addled", "center",
  887. X          "edge" },
  888. X!     *snake_parts[] = { "vestigial limb", "eye", "face", "large scale",
  889. X          "large scale tip", "rear region", "scale gap", "scale gapped",
  890. X          "head", "rear region", "light headed", "neck", "rear scale" };
  891. X      
  892. X***************
  893. X*** 709,715 ****
  894. X   */
  895. X  #ifdef POLYSELF
  896. X      if (uasmon->mflags1 & M1_FEM) return 1;
  897. X! #ifdef HARD
  898. X      if (u.umonnum==PM_INCUBUS) return 0;
  899. X  #endif
  900. X      if (!humanoid(uasmon)) return 2;
  901. X--- 710,716 ----
  902. X   */
  903. X  #ifdef POLYSELF
  904. X      if (uasmon->mflags1 & M1_FEM) return 1;
  905. X! #ifdef INFERNO
  906. X      if (u.umonnum==PM_INCUBUS) return 0;
  907. X  #endif
  908. X      if (!humanoid(uasmon)) return 2;
  909. X***************
  910. X*** 721,727 ****
  911. X  #ifdef GOLEMS
  912. X  void
  913. X  ugolemeffects(damtype, dam)
  914. X! int damtype;
  915. X  {
  916. X      int heal = 0;
  917. X      /* We won't bother with "slow"/"haste" since players do not
  918. X--- 722,728 ----
  919. X  #ifdef GOLEMS
  920. X  void
  921. X  ugolemeffects(damtype, dam)
  922. X! int damtype, dam;
  923. X  {
  924. X      int heal = 0;
  925. X      /* We won't bother with "slow"/"haste" since players do not
  926. X*** src/Old/potion.c    Sun Nov 19 13:05:59 1989
  927. X--- src/potion.c    Sat Nov 18 21:17:43 1989
  928. X***************
  929. X*** 127,133 ****
  930. X      if (!xtime && old ) {
  931. X          if (!Blind && talk) pline("Everything looks SO boring now.");
  932. X          for (mtmp=fmon; mtmp; mtmp=mtmp->nmon)
  933. X!           if ((Blind && Telepat) || canseemon(mtmp))
  934. X              atl(mtmp->mx, mtmp->my, (!mtmp->mappearance ||
  935. X                           Protection_from_shape_changers)
  936. X              ? mtmp->data->mlet : mtmp->mappearance);
  937. X--- 127,133 ----
  938. X      if (!xtime && old ) {
  939. X          if (!Blind && talk) pline("Everything looks SO boring now.");
  940. X          for (mtmp=fmon; mtmp; mtmp=mtmp->nmon)
  941. X!           if (showmon(mtmp))
  942. X              atl(mtmp->mx, mtmp->my, (!mtmp->mappearance ||
  943. X                           Protection_from_shape_changers)
  944. X              ? mtmp->data->mlet : mtmp->mappearance);
  945. X***************
  946. X*** 182,188 ****
  947. X--- 182,190 ----
  948. X  
  949. X      otmp = getobj(beverages, "drink");
  950. X      if(!otmp) return(0);
  951. X+ #ifndef NO_SIGNAL
  952. X      otmp->in_use = TRUE;        /* you've opened the stopper */
  953. X+ #endif
  954. X      if(objects[otmp->otyp].oc_descr && !strcmp(objects[otmp->otyp].oc_descr, "smoky") && !rn2(13)) {
  955. X          ghost_from_bottle();
  956. X          useup(otmp);
  957. X***************
  958. X*** 259,267 ****
  959. X      case POT_WATER:
  960. X          if(!otmp->blessed && !otmp->cursed) {
  961. X              pline("This tastes like %swater.",
  962. X!                   otmp->spe == -1 ? "impure " :
  963. X!                   !otmp->rustfree ? "" : "mineral "
  964. X!                  );
  965. X              lesshungry(rnd(otmp->spe == -1 ? 3 : 10));
  966. X              break;
  967. X          }
  968. X--- 261,267 ----
  969. X      case POT_WATER:
  970. X          if(!otmp->blessed && !otmp->cursed) {
  971. X              pline("This tastes like %swater.",
  972. X!                   otmp->spe == -1 ? "impure " : "");
  973. X              lesshungry(rnd(otmp->spe == -1 ? 3 : 10));
  974. X              break;
  975. X          }
  976. X***************
  977. X*** 317,323 ****
  978. X              unkn++;
  979. X              You("have an uneasy feeling...");
  980. X          } else {
  981. X!             You("feel self-knowledgable...");
  982. X              if (otmp->blessed) {
  983. X                  adjattrib(A_INT, 1, FALSE);
  984. X                  adjattrib(A_WIS, 1, FALSE);
  985. X--- 317,323 ----
  986. X              unkn++;
  987. X              You("have an uneasy feeling...");
  988. X          } else {
  989. X!             You("feel self-knowledgeable...");
  990. X              if (otmp->blessed) {
  991. X                  adjattrib(A_INT, 1, FALSE);
  992. X                  adjattrib(A_WIS, 1, FALSE);
  993. X***************
  994. X*** 786,792 ****
  995. X      /* note: no obfree() */
  996. X  }
  997. X  
  998. X! static int
  999. X  neutralizes(o1, o2)
  1000. X  register struct obj *o1, *o2;
  1001. X  {
  1002. X--- 786,792 ----
  1003. X      /* note: no obfree() */
  1004. X  }
  1005. X  
  1006. X! static boolean
  1007. X  neutralizes(o1, o2)
  1008. X  register struct obj *o1, *o2;
  1009. X  {
  1010. X***************
  1011. X*** 797,813 ****
  1012. X          case POT_CONFUSION:
  1013. X              if (o2->otyp == POT_HEALING ||
  1014. X                  o2->otyp == POT_EXTRA_HEALING)
  1015. X!                 return 1;
  1016. X          case POT_HEALING:
  1017. X          case POT_EXTRA_HEALING:
  1018. X              if (o2->otyp == POT_SICKNESS ||
  1019. X                  o2->otyp == POT_HALLUCINATION ||
  1020. X                  o2->otyp == POT_BLINDNESS ||
  1021. X                  o2->otyp == POT_CONFUSION)
  1022. X!                 return 1;
  1023. X      }
  1024. X  
  1025. X!     return 0;
  1026. X  }
  1027. X  
  1028. X  int
  1029. X--- 797,856 ----
  1030. X          case POT_CONFUSION:
  1031. X              if (o2->otyp == POT_HEALING ||
  1032. X                  o2->otyp == POT_EXTRA_HEALING)
  1033. X!                 return TRUE;
  1034. X          case POT_HEALING:
  1035. X          case POT_EXTRA_HEALING:
  1036. X+         case UNICORN_HORN:
  1037. X              if (o2->otyp == POT_SICKNESS ||
  1038. X                  o2->otyp == POT_HALLUCINATION ||
  1039. X                  o2->otyp == POT_BLINDNESS ||
  1040. X                  o2->otyp == POT_CONFUSION)
  1041. X!                 return TRUE;
  1042. X      }
  1043. X  
  1044. X!     return FALSE;
  1045. X! }
  1046. X! 
  1047. X! boolean
  1048. X! get_wet(obj)
  1049. X! register struct obj *obj;
  1050. X! /* returns TRUE if something happened (potion should be used up) */
  1051. X! {
  1052. X!     switch (obj->olet) {
  1053. X!         case WEAPON_SYM:
  1054. X!         if (!obj->rustfree &&
  1055. X!             objects[obj->otyp].oc_material == METAL &&
  1056. X!             obj->spe > -6 && !rn2(10)) {
  1057. X!             Your("%s somewhat.", aobjnam(obj,"rust"));
  1058. X!             obj->spe--;
  1059. X!             return TRUE;
  1060. X!         } else break;
  1061. X!         case POTION_SYM:
  1062. X!         if (obj->otyp == POT_WATER) return FALSE;
  1063. X!         Your("%s.", aobjnam(obj,"dilute"));
  1064. X!         if (obj->spe == -1) {
  1065. X!             obj->spe = 0;
  1066. X!             obj->blessed = obj->cursed = 0;
  1067. X!             obj->otyp = POT_WATER;
  1068. X!         } else obj->spe--;
  1069. X!         return TRUE;
  1070. X!         case SCROLL_SYM:
  1071. X!         if (obj->otyp != SCR_BLANK_PAPER
  1072. X! #ifdef MAIL
  1073. X!             && obj->otyp != SCR_MAIL
  1074. X! #endif
  1075. X!             ) {
  1076. X!             if (!Blind) {
  1077. X!                 if (obj->quan == 1)
  1078. X!                     pline("The scroll fades.");
  1079. X!                 else pline("The scrolls fade.");
  1080. X!             }
  1081. X!             obj->otyp = SCR_BLANK_PAPER;
  1082. X!             return TRUE;
  1083. X!         }
  1084. X!     }
  1085. X!     Your("%s wet.", aobjnam(obj,"get"));
  1086. X!     return FALSE;
  1087. X  }
  1088. X  
  1089. X  int
  1090. X***************
  1091. X*** 815,826 ****
  1092. X  {
  1093. X      register struct obj *potion, *obj;
  1094. X      char *tmp;
  1095. X  
  1096. X      if(!(obj = getobj("#", "dip")))
  1097. X          return(0);
  1098. X  #ifdef FOUNTAINS
  1099. X      /* Is there a fountain to dip into here? */
  1100. X!     if (IS_FOUNTAIN(levl[u.ux][u.uy].typ)) {
  1101. X          pline("Dip it into the fountain? ");
  1102. X          if(yn() == 'y') {
  1103. X              dipfountain(obj);
  1104. X--- 858,872 ----
  1105. X  {
  1106. X      register struct obj *potion, *obj;
  1107. X      char *tmp;
  1108. X+     uchar here;
  1109. X  
  1110. X      if(!(obj = getobj("#", "dip")))
  1111. X          return(0);
  1112. X+ 
  1113. X+     here = levl[u.ux][u.uy].typ;
  1114. X  #ifdef FOUNTAINS
  1115. X      /* Is there a fountain to dip into here? */
  1116. X!     if (IS_FOUNTAIN(here)) {
  1117. X          pline("Dip it into the fountain? ");
  1118. X          if(yn() == 'y') {
  1119. X              dipfountain(obj);
  1120. X***************
  1121. X*** 828,833 ****
  1122. X--- 874,888 ----
  1123. X          }
  1124. X      }
  1125. X  #endif
  1126. X+         if (is_pool(u.ux,u.uy)) {
  1127. X+         pline("Dip it into the %s? ",
  1128. X+               here == POOL ? "pool" : "moat");
  1129. X+         if(yn() == 'y') {
  1130. X+             (void) get_wet(obj);
  1131. X+             return(1);
  1132. X+         }
  1133. X+     }
  1134. X+ 
  1135. X      if(!(potion = getobj(beverages, "dip into")))
  1136. X          return(0);
  1137. X      if (potion==obj && potion->quan==1) {
  1138. X***************
  1139. X*** 879,914 ****
  1140. X                  obj->bknown=1;
  1141. X                  goto poof;
  1142. X              }
  1143. X!         } else if (obj->otyp != POT_WATER) {
  1144. X!             if (obj->olet == WEAPON_SYM && !obj->rustfree &&
  1145. X!                 objects[obj->otyp].oc_material == METAL &&
  1146. X!                 obj->spe > -6 && !rn2(10)) {
  1147. X!                 Your("%s somewhat.", aobjnam(obj,"rust"));
  1148. X!                 obj->spe--;
  1149. X!                 goto poof;
  1150. X!             } else if (obj->olet == POTION_SYM) {
  1151. X!                 Your("%s.", aobjnam(obj,"dilute"));
  1152. X!                 if (obj->spe == -1) {
  1153. X!                     obj->spe = 0;
  1154. X!                     obj->blessed = obj->cursed = 0;
  1155. X!                     obj->otyp = POT_WATER;
  1156. X!                 } else obj->spe--;
  1157. X!                 goto poof;
  1158. X!             } else if (obj->olet == SCROLL_SYM &&
  1159. X! #ifdef MAIL
  1160. X!                    obj->otyp != SCR_MAIL &&
  1161. X! #endif
  1162. X!                    obj->otyp != SCR_BLANK_PAPER) {
  1163. X!                 if (!Blind) {
  1164. X!                     if (obj->quan == 1)
  1165. X!                         pline("The scroll fades.");
  1166. X!                     else pline("The scrolls fade.");
  1167. X!                 }
  1168. X!                 obj->otyp = SCR_BLANK_PAPER;
  1169. X!                 goto poof;
  1170. X!             } else
  1171. X!                 Your("%s wet.", aobjnam(obj,"get"));
  1172. X!         }
  1173. X      }
  1174. X      else if(obj->olet == POTION_SYM && obj->otyp != potion->otyp) {
  1175. X          /* Mixing potions is dangerous... */
  1176. X--- 934,942 ----
  1177. X                  obj->bknown=1;
  1178. X                  goto poof;
  1179. X              }
  1180. X!         } else
  1181. X!             if (get_wet(obj))
  1182. X!                 goto poof;
  1183. X      }
  1184. X      else if(obj->olet == POTION_SYM && obj->otyp != potion->otyp) {
  1185. X          /* Mixing potions is dangerous... */
  1186. X***************
  1187. X*** 926,933 ****
  1188. X          obj->blessed = obj->cursed = obj->bknown = 0;
  1189. X          if (Blind) obj->dknown = 0;
  1190. X  
  1191. X!         switch (neutralizes(obj, potion) || obj->spe == -1 ?
  1192. X!             1 : rnd(8)) {
  1193. X              case 1:
  1194. X                  obj->otyp = POT_WATER;
  1195. X                  obj->blessed = obj->cursed = 0;
  1196. X--- 954,961 ----
  1197. X          obj->blessed = obj->cursed = obj->bknown = 0;
  1198. X          if (Blind) obj->dknown = 0;
  1199. X  
  1200. X!         switch (neutralizes(obj, potion) ||
  1201. X!             obj->spe == -1 /* diluted */ ? 1 : rnd(8)) {
  1202. X              case 1:
  1203. X                  obj->otyp = POT_WATER;
  1204. X                  obj->blessed = obj->cursed = 0;
  1205. X***************
  1206. X*** 982,987 ****
  1207. X--- 1010,1023 ----
  1208. X          goto poof;
  1209. X          }
  1210. X      }
  1211. X+ 
  1212. X+     if(obj->otyp == UNICORN_HORN && neutralizes(obj, potion)) {
  1213. X+         pline("The potion clears.");
  1214. X+         potion->otyp = POT_WATER;
  1215. X+         potion->blessed = potion->cursed = 0;
  1216. X+         return(1);
  1217. X+     }
  1218. X+ 
  1219. X      pline("Interesting...");
  1220. X      return(1);
  1221. X  }
  1222. X*** src/Old/pray.c    Sun Nov 19 13:06:43 1989
  1223. X--- src/pray.c    Sat Nov 11 16:11:29 1989
  1224. X***************
  1225. X*** 184,192 ****
  1226. X              break;
  1227. X          case TROUBLE_HIT:
  1228. X              if (!Blind) {
  1229. X!             const char *tmp = Hallucination ? hcolor() : golden;
  1230. X!             pline("A%s %s glow surrounds you.",
  1231. X!                   index(vowels,*tmp) ? "n" : "", tmp);
  1232. X              } else You("feel much better.");
  1233. X              u.uhp = u.uhpmax += 5;
  1234. X              flags.botl = 1;
  1235. X--- 184,191 ----
  1236. X              break;
  1237. X          case TROUBLE_HIT:
  1238. X              if (!Blind) {
  1239. X!             pline("%s glow surrounds you.",
  1240. X!                   An(Hallucination ? hcolor() : golden));
  1241. X              } else You("feel much better.");
  1242. X              u.uhp = u.uhpmax += 5;
  1243. X              flags.botl = 1;
  1244. X***************
  1245. X*** 312,319 ****
  1246. X  
  1247. X          case 0:
  1248. X          case 1:    if (Hallucination)
  1249. X!                 You("feel %sholy dread.",
  1250. X!                   u.ualigntyp == U_CHAOTIC ? "an un" : "a ");
  1251. X              else You("feel that %s is %s.",
  1252. X  #  ifdef ALTARS
  1253. X                     on_altar() ? a_gname() : u_gname(),
  1254. X--- 311,318 ----
  1255. X  
  1256. X          case 0:
  1257. X          case 1:    if (Hallucination)
  1258. X!                 You("feel a%sholy dread.",
  1259. X!                   u.ualigntyp == U_CHAOTIC ? "n un" : " ");
  1260. X              else You("feel that %s is %s.",
  1261. X  #  ifdef ALTARS
  1262. X                     on_altar() ? a_gname() : u_gname(),
  1263. X***************
  1264. X*** 350,360 ****
  1265. X                  break;
  1266. X              } /* else fall thru */
  1267. X          case 4:
  1268. X!         case 5:    if (!Blind) {
  1269. X!                 const char *temp = Hallucination ? hcolor() : black;
  1270. X!                 pline("A%s %s glow surrounds you.",
  1271. X!                   index(vowels,*temp) ? "n" : "", temp);
  1272. X!             }
  1273. X              rndcurse();
  1274. X              break;
  1275. X          case 7:
  1276. X--- 349,357 ----
  1277. X                  break;
  1278. X              } /* else fall thru */
  1279. X          case 4:
  1280. X!         case 5:    if (!Blind)
  1281. X!                 pline("%s glow surrounds you.",
  1282. X!                   An(Hallucination ? hcolor() : black));
  1283. X              rndcurse();
  1284. X              break;
  1285. X          case 7:
  1286. X***************
  1287. X*** 407,413 ****
  1288. X  
  1289. X  static void
  1290. X  pleased() {
  1291. X-     char    *tmp;
  1292. X      int trouble = in_trouble ();    /* what's your worst difficulty? */
  1293. X      int pat_on_head = 0;
  1294. X  
  1295. X--- 404,409 ----
  1296. X***************
  1297. X*** 481,490 ****
  1298. X                  } else if(uwep->otyp < BOW) {
  1299. X                  uwep->blessed = uwep->bknown = 1;
  1300. X                  if (!Blind) {
  1301. X!                     tmp = Hallucination ? hcolor() : light_blue;
  1302. X!                     Your("%s with a%s %s aura.",
  1303. X                        aobjnam(uwep, "softly glow"),
  1304. X!                       index(vowels,*tmp) ? "n" : "", tmp);
  1305. X                  }
  1306. X                  }
  1307. X              }
  1308. X--- 477,485 ----
  1309. X                  } else if(uwep->otyp < BOW) {
  1310. X                  uwep->blessed = uwep->bknown = 1;
  1311. X                  if (!Blind) {
  1312. X!                     Your("%s with %s aura.",
  1313. X                        aobjnam(uwep, "softly glow"),
  1314. X!                       an(Hallucination ? hcolor() : light_blue));
  1315. X                  }
  1316. X                  }
  1317. X              }
  1318. X***************
  1319. X*** 507,517 ****
  1320. X              }
  1321. X              /* Otherwise, falls into next case */
  1322. X  #endif
  1323. X!         case 2:    if (!Blind) {
  1324. X!                 tmp = Hallucination ? hcolor() : golden;
  1325. X!                 You("are surrounded by a%s %s glow.",
  1326. X!                   index(vowels,*tmp) ? "n" : "", tmp);
  1327. X!             }
  1328. X              u.uhp = u.uhpmax += 5;
  1329. X              ABASE(A_STR) = AMAX(A_STR);
  1330. X              if (u.uhunger < 900)    init_uhunger();
  1331. X--- 502,510 ----
  1332. X              }
  1333. X              /* Otherwise, falls into next case */
  1334. X  #endif
  1335. X!         case 2:    if (!Blind)
  1336. X!                 You("are surrounded by %s glow.",
  1337. X!                 an(Hallucination ? hcolor() : golden));
  1338. X              u.uhp = u.uhpmax += 5;
  1339. X              ABASE(A_STR) = AMAX(A_STR);
  1340. X              if (u.uhunger < 900)    init_uhunger();
  1341. X***************
  1342. X*** 522,532 ****
  1343. X          case 4:
  1344. X          {    register struct obj *otmp;
  1345. X  
  1346. X-             tmp = Hallucination ? hcolor() : light_blue;
  1347. X              if (Blind)
  1348. X                  You("feel the power of %s.", u_gname());
  1349. X!             else You("are surrounded by a%s %s aura.",
  1350. X!                     index(vowels,*tmp) ? "n" : "", tmp);
  1351. X              for(otmp=invent; otmp; otmp=otmp->nobj) {
  1352. X                  if (otmp->cursed) {
  1353. X                      otmp->cursed = 0;
  1354. X--- 515,524 ----
  1355. X          case 4:
  1356. X          {    register struct obj *otmp;
  1357. X  
  1358. X              if (Blind)
  1359. X                  You("feel the power of %s.", u_gname());
  1360. X!             else You("are surrounded by %s aura.",
  1361. X!                  an(Hallucination ? hcolor() : light_blue));
  1362. X              for(otmp=invent; otmp; otmp=otmp->nobj) {
  1363. X                  if (otmp->cursed) {
  1364. X                      otmp->cursed = 0;
  1365. X***************
  1366. X*** 598,605 ****
  1367. X                      pline("Something appears at your %s.",
  1368. X                      makeplural(body_part(FOOT)));
  1369. X                  else
  1370. X!                     pline("A %s sword appears at your %s!",
  1371. X!                     Hallucination ? hcolor() : "black",
  1372. X                      makeplural(body_part(FOOT)));
  1373. X                  obj = mksobj(BROADSWORD, FALSE);
  1374. X                  obj = oname(obj, "Stormbringer", 0);
  1375. X--- 590,597 ----
  1376. X                      pline("Something appears at your %s.",
  1377. X                      makeplural(body_part(FOOT)));
  1378. X                  else
  1379. X!                     pline("%s sword appears at your %s!",
  1380. X!                     An(Hallucination ? hcolor() : black),
  1381. X                      makeplural(body_part(FOOT)));
  1382. X                  obj = mksobj(BROADSWORD, FALSE);
  1383. X                  obj = oname(obj, "Stormbringer", 0);
  1384. X***************
  1385. X*** 678,684 ****
  1386. X          pline("Your sacrifice disappears!");
  1387. X      else pline ("Your sacrifice is consumed in a %s!",
  1388. X              u.ualigntyp == U_LAWFUL ? "flash of light" : "burst of flame");
  1389. X!     useup(otmp);
  1390. X  }
  1391. X  
  1392. X  int
  1393. X--- 670,677 ----
  1394. X          pline("Your sacrifice disappears!");
  1395. X      else pline ("Your sacrifice is consumed in a %s!",
  1396. X              u.ualigntyp == U_LAWFUL ? "flash of light" : "burst of flame");
  1397. X!     if (carried(otmp)) useup(otmp);
  1398. X!     else useupf(otmp);
  1399. X  }
  1400. X  
  1401. X  int
  1402. X***************
  1403. X*** 713,719 ****
  1404. X     a pet corpse was tame, so you can still sacrifice it.)
  1405. X   */
  1406. X  
  1407. X! #define MAXVALUE 33    /* Highest corpse value (approx.) */
  1408. X  
  1409. X      if (otmp->otyp == CORPSE) {
  1410. X          register struct permonst *mtmp = &mons[otmp->corpsenm];
  1411. X--- 706,712 ----
  1412. X     a pet corpse was tame, so you can still sacrifice it.)
  1413. X   */
  1414. X  
  1415. X! #define MAXVALUE 24    /* Highest corpse value (besides Wiz) */
  1416. X  
  1417. X      if (otmp->otyp == CORPSE) {
  1418. X          register struct permonst *mtmp = &mons[otmp->corpsenm];
  1419. X***************
  1420. X*** 722,729 ****
  1421. X          if (otmp->corpsenm == PM_ACID_BLOB || (monstermoves <= otmp->age + 50))
  1422. X          value = monstr[otmp->corpsenm] + 1;
  1423. X          if (otmp->oeaten)
  1424. X!         value =
  1425. X!             value * otmp->owt / mons[otmp->corpsenm].cwt / otmp->quan;
  1426. X  
  1427. X          if (is_human(mtmp)) { /* Human sacrifice! */
  1428. X  #ifdef POLYSELF
  1429. X--- 715,721 ----
  1430. X          if (otmp->corpsenm == PM_ACID_BLOB || (monstermoves <= otmp->age + 50))
  1431. X          value = monstr[otmp->corpsenm] + 1;
  1432. X          if (otmp->oeaten)
  1433. X!         value = eaten_stat(value, otmp);
  1434. X  
  1435. X          if (is_human(mtmp)) { /* Human sacrifice! */
  1436. X  #ifdef POLYSELF
  1437. X***************
  1438. X*** 741,747 ****
  1439. X              angry_priest();
  1440. X          } else {
  1441. X              register struct monst *dmon;
  1442. X-             const char *color = Hallucination ? hcolor() : black;
  1443. X      /* Human sacrifice on a chaotic altar is equivalent to demon summoning */
  1444. X  #ifdef THEOLOGY
  1445. X              if (levl[u.ux][u.uy].altarmask & A_SHRINE)
  1446. X--- 733,738 ----
  1447. X***************
  1448. X*** 748,756 ****
  1449. X                  pline("The blood covers the altar!");
  1450. X              else {
  1451. X  #endif
  1452. X!     pline("The blood floods over the altar, which vanishes in a%s %s cloud!",
  1453. X!                   index(vowels, *color) ? "n" : "", color);
  1454. X                  levl[u.ux][u.uy].typ = ROOM;
  1455. X  #ifdef THEOLOGY
  1456. X              }
  1457. X  #endif
  1458. X--- 739,748 ----
  1459. X                  pline("The blood covers the altar!");
  1460. X              else {
  1461. X  #endif
  1462. X!     pline("The blood floods over the altar, which vanishes in %s cloud!",
  1463. X!                   an(Hallucination ? hcolor() : black));
  1464. X                  levl[u.ux][u.uy].typ = ROOM;
  1465. X+                 levl[u.ux][u.uy].altarmask = 0;
  1466. X  #ifdef THEOLOGY
  1467. X              }
  1468. X  #endif
  1469. X***************
  1470. X*** 772,778 ****
  1471. X              if (!Inhell) angrygods();
  1472. X              change_luck(-5);
  1473. X          } else adjalign(5);
  1474. X!         useup(otmp);
  1475. X          return(1);
  1476. X          } else if (is_undead(mtmp)) { /* Not demons--no demon corpses */
  1477. X          if (u.ualigntyp != U_CHAOTIC)
  1478. X--- 764,771 ----
  1479. X              if (!Inhell) angrygods();
  1480. X              change_luck(-5);
  1481. X          } else adjalign(5);
  1482. X!         if (carried(otmp)) useup(otmp);
  1483. X!         else useupf(otmp);
  1484. X          return(1);
  1485. X          } else if (is_undead(mtmp)) { /* Not demons--no demon corpses */
  1486. X          if (u.ualigntyp != U_CHAOTIC)
  1487. X***************
  1488. X*** 828,834 ****
  1489. X          else {
  1490. X              /* The final Test.    Did you win? */
  1491. X              if(uamul == otmp) Amulet_off();
  1492. X!             useup(otmp);    /* well, it's gone now */
  1493. X              You("offer the Amulet to %s...", a_gname());
  1494. X              if (u.ualigntyp !=
  1495. X                  (levl[u.ux][u.uy].altarmask & ~A_SHRINE) - 1) {
  1496. X--- 821,828 ----
  1497. X          else {
  1498. X              /* The final Test.    Did you win? */
  1499. X              if(uamul == otmp) Amulet_off();
  1500. X!             if(carried(otmp)) useup(otmp);    /* well, it's gone now */
  1501. X!             else useupf(otmp);
  1502. X              You("offer the Amulet to %s...", a_gname());
  1503. X              if (u.ualigntyp !=
  1504. X                  (levl[u.ux][u.uy].altarmask & ~A_SHRINE) - 1) {
  1505. X***************
  1506. X*** 1094,1099 ****
  1507. X--- 1088,1106 ----
  1508. X  
  1509. X      if((pl_character[0] != 'P') &&
  1510. X         (pl_character[0] != 'K')) {
  1511. X+ #ifdef SPELLS
  1512. X+         /* Try to use turn undead spell. */
  1513. X+         if (objects[SPE_TURN_UNDEAD].oc_name_known) {
  1514. X+             register int sp_no;
  1515. X+             for (sp_no = 0; sp_no < MAXSPELL &&
  1516. X+                 spl_book[sp_no].sp_id != NO_SPELL &&
  1517. X+                 spl_book[sp_no].sp_id != SPE_TURN_UNDEAD; sp_no++);
  1518. X+ 
  1519. X+             if (sp_no < MAXSPELL &&
  1520. X+             spl_book[sp_no].sp_id == SPE_TURN_UNDEAD)
  1521. X+                 return spelleffects(++sp_no, TRUE);
  1522. X+         }
  1523. X+ #endif
  1524. X  
  1525. X          You("don't know how to turn undead!");
  1526. X          return(0);
  1527. X*** src/Old/pri.c    Sun Nov 19 13:07:30 1989
  1528. X--- src/pri.c    Fri Nov 17 20:44:47 1989
  1529. X***************
  1530. X*** 1,4 ****
  1531. X! /*    SCCS Id: @(#)pri.c    3.0    89/06/16
  1532. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1533. X  /* NetHack may be freely redistributed.  See license for details. */
  1534. X  
  1535. X--- 1,4 ----
  1536. X! /*    SCCS Id: @(#)pri.c    3.0    89/11/15
  1537. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  1538. X  /* NetHack may be freely redistributed.  See license for details. */
  1539. X  
  1540. X***************
  1541. X*** 9,31 ****
  1542. X  #if defined(ALTARS) && defined(THEOLOGY)
  1543. X  #include "epri.h"
  1544. X  #endif
  1545. X  
  1546. X! static void hilite P((int,int,UCHAR_P, UCHAR_P));
  1547. X! static void cornbot P((int));
  1548. X! static boolean ismnst P((CHAR_P));
  1549. X  #ifdef TEXTCOLOR
  1550. X! static uchar mimic_color P((UCHAR_P));
  1551. X  #endif
  1552. X  
  1553. X! #if defined(MSDOS) && !defined(TERMLIB) && !defined(DECRAINBOW)
  1554. X! #  define g_putch  (void) putchar
  1555. X! #endif
  1556. X! 
  1557. X! /* This is the same logic used for "#define IBMXASCII" in file "termcap.c" */
  1558. X! #if !defined(AMIGA)
  1559. X! # if defined(TERMLIB) || !(defined(DECRAINBOW) || defined(OS2))
  1560. X! #  define g_putch  (void) putchar
  1561. X! # endif
  1562. X  #endif
  1563. X  
  1564. X  #ifndef g_putch
  1565. X--- 9,25 ----
  1566. X  #if defined(ALTARS) && defined(THEOLOGY)
  1567. X  #include "epri.h"
  1568. X  #endif
  1569. X+ #include "termcap.h"
  1570. X  
  1571. X! static void FDECL(hilite, (int,int,UCHAR_P, UCHAR_P));
  1572. X! static void FDECL(cornbot, (int));
  1573. X! static boolean FDECL(ismnst, (CHAR_P));
  1574. X  #ifdef TEXTCOLOR
  1575. X! static uchar FDECL(mimic_color, (UCHAR_P));
  1576. X  #endif
  1577. X  
  1578. X! #ifndef ASCIIGRAPH
  1579. X! # define g_putch  (void) putchar
  1580. X  #endif
  1581. X  
  1582. X  #ifndef g_putch
  1583. X***************
  1584. X*** 39,44 ****
  1585. X--- 33,42 ----
  1586. X  static const char *dispst = "*0#@#0#*0#@#0#*0#@#0#*0#@#0#*0#@#0#*";
  1587. X  static int mrank_sz = 0;  /* loaded by max_rank_sz (called in u_init) */
  1588. X  
  1589. X+ #ifdef CLIPPING
  1590. X+ #define curs(x, y) win_curs((x), (y)-2)
  1591. X+ #endif
  1592. X+ 
  1593. X  void
  1594. X  swallowed(first)
  1595. X  register int first;
  1596. X***************
  1597. X*** 90,102 ****
  1598. X--- 88,144 ----
  1599. X      u.udisx = u.ux;
  1600. X      u.udisy = u.uy;
  1601. X  }
  1602. X+ #ifdef CLIPPING
  1603. X+ #undef curs
  1604. X+ #endif
  1605. X  
  1606. X  void
  1607. X  setclipped()
  1608. X  {
  1609. X+ #ifndef CLIPPING
  1610. X      error("NetHack needs a screen of size at least %d by %d.\n",
  1611. X          ROWNO+3, COLNO);
  1612. X+ #else
  1613. X+     clipping = TRUE;
  1614. X+     clipx = clipy = 0;
  1615. X+     clipxmax = CO;
  1616. X+     clipymax = LI - 3;
  1617. X+ #endif
  1618. X+ }
  1619. X+ 
  1620. X+ #ifdef CLIPPING
  1621. X+ void
  1622. X+ cliparound(x, y)
  1623. X+ int x, y;
  1624. X+ {
  1625. X+     int oldx = clipx, oldy = clipy;
  1626. X+ 
  1627. X+     if (!clipping) return;
  1628. X+     if (x < clipx + 5) {
  1629. X+         clipx = max(0, x - 20);
  1630. X+         clipxmax = clipx + CO;
  1631. X+     }
  1632. X+     else if (x > clipxmax - 5) {
  1633. X+         clipxmax = min(COLNO, clipxmax + 20);
  1634. X+         clipx = clipxmax - CO;
  1635. X+     }
  1636. X+     if (y < clipy + 2) {
  1637. X+         clipy = max(0, y - 10);
  1638. X+         clipymax = clipy + (LI - 3);
  1639. X+     }
  1640. X+     else if (y > clipymax - 2) {
  1641. X+         clipymax = min(ROWNO, clipymax + 10);
  1642. X+         clipy = clipxmax - (LI - 3);
  1643. X+     }
  1644. X+     if (clipx != oldx || clipy != oldy) {
  1645. X+         if (u.udispl) {
  1646. X+             u.udispl = 0;
  1647. X+             levl[u.udisx][u.udisy].scrsym = news0(u.udisx, u.udisy);
  1648. X+         }
  1649. X+         doredraw();
  1650. X+     }
  1651. X  }
  1652. X+ #endif /* CLIPPING */
  1653. X  
  1654. X  /*
  1655. X   *  Allow for a different implementation than this...
  1656. X***************
  1657. X*** 108,114 ****
  1658. X  g_putch(ch)
  1659. X  uchar ch;
  1660. X  {
  1661. X!     if (ch & 0x80) {
  1662. X          if (!GFlag) {
  1663. X              graph_on();
  1664. X              GFlag = TRUE;
  1665. X--- 150,158 ----
  1666. X  g_putch(ch)
  1667. X  uchar ch;
  1668. X  {
  1669. X!     if (IBMgraphics)    /* IBM-compatible displays don't need other stuff */
  1670. X!         (void) putchar(ch);
  1671. X!     else if (ch & 0x80) {
  1672. X          if (!GFlag) {
  1673. X              graph_on();
  1674. X              GFlag = TRUE;
  1675. X***************
  1676. X*** 125,131 ****
  1677. X  
  1678. X  #endif
  1679. X  
  1680. X! static boolean
  1681. X  showmon(mon)
  1682. X  register struct monst *mon;
  1683. X  {
  1684. X--- 169,175 ----
  1685. X  
  1686. X  #endif
  1687. X  
  1688. X! boolean
  1689. X  showmon(mon)
  1690. X  register struct monst *mon;
  1691. X  {
  1692. X***************
  1693. X*** 168,178 ****
  1694. X              (!OBJ_AT(x, y) && !levl[x][y].gmask || is_pool(x,y)))
  1695. X              typ = AT_MAP;
  1696. X  
  1697. X!     y += 2;
  1698. X!     curs(x,y);
  1699. X! 
  1700. X!     hilite(x, y-2, ch, typ);
  1701. X      curx++;
  1702. X  }
  1703. X  
  1704. X  void
  1705. X--- 212,227 ----
  1706. X              (!OBJ_AT(x, y) && !levl[x][y].gmask || is_pool(x,y)))
  1707. X              typ = AT_MAP;
  1708. X  
  1709. X! #ifdef CLIPPING
  1710. X!     if (win_curs(x, y)) {
  1711. X! #else
  1712. X!     curs(x,y+2);
  1713. X! #endif
  1714. X!     hilite(x, y, ch, typ);
  1715. X      curx++;
  1716. X+ #ifdef CLIPPING
  1717. X+     }
  1718. X+ #endif
  1719. X  }
  1720. X  
  1721. X  void
  1722. X***************
  1723. X*** 269,275 ****
  1724. X          mtmp->mdispl = 0;
  1725. X      seemons();    /* force new positions to be shown */
  1726. X  
  1727. X! #if (defined(DGK) && !defined(TEXTCOLOR)) || defined(MACOS)
  1728. X  # ifdef MACOS
  1729. X      t = (term_info *)GetWRefCon(HackWindow);
  1730. X      if (!t->inColor)
  1731. X--- 318,324 ----
  1732. X          mtmp->mdispl = 0;
  1733. X      seemons();    /* force new positions to be shown */
  1734. X  
  1735. X! #if ((defined(DGK) && !defined(TEXTCOLOR)) || defined(MACOS)) & !defined(CLIPPING)
  1736. X  # ifdef MACOS
  1737. X      t = (term_info *)GetWRefCon(HackWindow);
  1738. X      if (!t->inColor)
  1739. X***************
  1740. X*** 328,334 ****
  1741. X                  at(x,y,room->scrsym,AT_APP);
  1742. X              } else if(room->seen)
  1743. X                  at(x,y,room->scrsym,AT_APP);
  1744. X! #endif /* DGK && !TEXTCOLOR */
  1745. X  #ifndef g_putch
  1746. X      if (GFlag) {
  1747. X          graph_off();
  1748. X--- 377,383 ----
  1749. X                  at(x,y,room->scrsym,AT_APP);
  1750. X              } else if(room->seen)
  1751. X                  at(x,y,room->scrsym,AT_APP);
  1752. X! #endif /* DGK && !TEXTCOLOR && !CLIPPING */
  1753. X  #ifndef g_putch
  1754. X      if (GFlag) {
  1755. X          graph_off();
  1756. X***************
  1757. X*** 364,369 ****
  1758. X--- 413,421 ----
  1759. X          return;
  1760. X      }
  1761. X  
  1762. X+ #ifdef CLIPPING
  1763. X+     xmin += clipx; ymax += clipy;
  1764. X+ #endif
  1765. X      seemons();    /* reset old positions */
  1766. X      for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
  1767. X          if(mtmp->mx >= xmin && mtmp->my < ymax)
  1768. X***************
  1769. X*** 370,378 ****
  1770. X--- 422,436 ----
  1771. X          mtmp->mdispl = 0;
  1772. X      seemons();    /* force new positions to be shown */
  1773. X  
  1774. X+ #ifdef CLIPPING
  1775. X+     for(y = clipy; y < ymax; y++) {
  1776. X+         if(clipping && y > clipymax && CD) break;
  1777. X+         curs(xmin - clipx, (y - clipy)+2);
  1778. X+ #else
  1779. X      for(y = 0; y < ymax; y++) {
  1780. X          if(y > ROWNO+1 && CD) break;
  1781. X          curs(xmin,y+2);
  1782. X+ #endif
  1783. X          cl_end();
  1784. X          if(y < ROWNO) {
  1785. X              for(x = xmin; x < COLNO; x++) {
  1786. X***************
  1787. X*** 444,451 ****
  1788. X              struct monst *mtmp = revive(obj, FALSE);
  1789. X  
  1790. X              if (mtmp && visible)
  1791. X!                 pline("%s rises from the dead!", Monnam(mtmp));
  1792. X!         } else if (obj->age + 250 < monstermoves) delobj(obj);
  1793. X          }
  1794. X      }
  1795. X  
  1796. X--- 502,513 ----
  1797. X              struct monst *mtmp = revive(obj, FALSE);
  1798. X  
  1799. X              if (mtmp && visible)
  1800. X!                 pline("%s rises from the dead!",
  1801. X!                     (mtmp->mhp==mtmp->mhpmax) ? Monnam(mtmp)
  1802. X!                     : Amonnam(mtmp, "bite-covered"));
  1803. X!         } else if (obj->corpsenm != PM_LIZARD &&
  1804. X!                         obj->age + 250 < monstermoves)
  1805. X!             delobj(obj);
  1806. X          }
  1807. X      }
  1808. X  
  1809. X***************
  1810. X*** 458,468 ****
  1811. X              struct monst *mtmp = revive(obj, TRUE);
  1812. X  
  1813. X              if (mtmp && wielded)
  1814. X!             pline("The %s %s writhes out of your grasp!",
  1815. X                  mtmp->data->mname, xname(obj));
  1816. X              else if (mtmp)
  1817. X              You("feel squirming in your backpack!");
  1818. X!         } else if (obj->age + 250 < monstermoves) useup(obj);
  1819. X          }
  1820. X      }
  1821. X  }
  1822. X--- 520,533 ----
  1823. X              struct monst *mtmp = revive(obj, TRUE);
  1824. X  
  1825. X              if (mtmp && wielded)
  1826. X!             pline("The %s%s %s writhes out of your grasp!",
  1827. X!                 (mtmp->mhp < mtmp->mhpmax) ? "bite-covered ":"",
  1828. X                  mtmp->data->mname, xname(obj));
  1829. X              else if (mtmp)
  1830. X              You("feel squirming in your backpack!");
  1831. X!         } else if (obj->corpsenm != PM_LIZARD &&
  1832. X!                         obj->age + 250 < monstermoves)
  1833. X!             useup(obj);
  1834. X          }
  1835. X      }
  1836. X  }
  1837. X***************
  1838. X*** 499,506 ****
  1839. X          if (Hallucination)
  1840. X          atl(mon->mx,mon->my,
  1841. X          (char) ((!mon->mimic || Protection_from_shape_changers) ?
  1842. X!         rndmonsym() : (mon->mappearance == DOOR_SYM) ?
  1843. X!         DOOR_SYM : rndobjsym()));
  1844. X          else
  1845. X  
  1846. X          atl(mon->mx,mon->my,
  1847. X--- 564,571 ----
  1848. X          if (Hallucination)
  1849. X          atl(mon->mx,mon->my,
  1850. X          (char) ((!mon->mimic || Protection_from_shape_changers) ?
  1851. X!         rndmonsym() : (mon->mappearance == CLOSED_DOOR_SYM) ?
  1852. X!         CLOSED_DOOR_SYM : rndobjsym()));
  1853. X          else
  1854. X  
  1855. X          atl(mon->mx,mon->my,
  1856. X***************
  1857. X*** 879,885 ****
  1858. X--- 944,954 ----
  1859. X          register char *bp0 = newbot, *bp1 = newbot;
  1860. X  
  1861. X          do {
  1862. X+ #ifdef CLIPPING
  1863. X+             if(*bp0 != ' ' || bp0[1] != ' ')
  1864. X+ #else
  1865. X              if(*bp0 != ' ' || bp0[1] != ' ' || bp0[2] != ' ')
  1866. X+ #endif
  1867. X                  *bp1++ = *bp0;
  1868. X          } while(*bp0++);
  1869. X      }
  1870. X***************
  1871. X*** 910,915 ****
  1872. X--- 979,987 ----
  1873. X  {
  1874. X      register int i,j;
  1875. X  
  1876. X+ #ifdef CLIPPING
  1877. X+     if (CO > 59) {
  1878. X+ #endif
  1879. X      Strcpy(newbot1, plname);
  1880. X      if('a' <= newbot1[0] && newbot1[0] <= 'z') newbot1[0] += 'A'-'a';
  1881. X      newbot1[10] = 0;
  1882. X***************
  1883. X*** 939,944 ****
  1884. X--- 1011,1021 ----
  1885. X            do { Sprintf(eos(newbot1)," "); /* pad with spaces */
  1886. X             i--;
  1887. X            } while((i - j) > 0);
  1888. X+ #ifdef CLIPPING
  1889. X+     }
  1890. X+     else
  1891. X+         *newbot1 = 0;
  1892. X+ #endif
  1893. X      if(ACURR(A_STR)>18) {
  1894. X          if(ACURR(A_STR)>118)
  1895. X              Sprintf(eos(newbot1),"St:%2d ",ACURR(A_STR)-100);
  1896. X***************
  1897. X*** 959,965 ****
  1898. X--- 1036,1046 ----
  1899. X          + u.urexp + (50 * maxdlevel)
  1900. X          + (maxdlevel > 20? 1000*((maxdlevel > 30) ? 10 : maxdlevel - 20) :0));
  1901. X  #endif
  1902. X+ #ifdef CLIPPING
  1903. X+     fillbot(min(LI-1, ROWNO+2), oldbot1, newbot1);
  1904. X+ #else
  1905. X      fillbot(ROWNO+2, oldbot1, newbot1);
  1906. X+ #endif
  1907. X  }
  1908. X  
  1909. X  static void
  1910. X***************
  1911. X*** 1016,1022 ****
  1912. X--- 1097,1107 ----
  1913. X      if(Blinded)       Sprintf(eos(newbot2), " Blind");
  1914. X      if(Stunned)       Sprintf(eos(newbot2), " Stun");
  1915. X      if(Hallucination)  Sprintf(eos(newbot2), " Hallu");
  1916. X+ #ifdef CLIPPING
  1917. X+     fillbot(min(LI, ROWNO+3), oldbot2, newbot2);
  1918. X+ #else
  1919. X      fillbot(ROWNO+3, oldbot2, newbot2);
  1920. X+ #endif
  1921. X  }
  1922. X  
  1923. X  void
  1924. X***************
  1925. X*** 1130,1136 ****
  1926. X  int x, y;
  1927. X  uchar let, typ;
  1928. X  {
  1929. X- 
  1930. X      if (let == ' '
  1931. X  #if !defined(MSDOS) && !defined(MACOS)
  1932. X          || !flags.standout
  1933. X--- 1215,1220 ----
  1934. X***************
  1935. X*** 1164,1181 ****
  1936. X                  default:
  1937. X                  if (u.ux == x && u.uy == y)
  1938. X                  typ = uasmon->mcolor;
  1939. X!                 else
  1940. X                      typ = level.monsters[x][y]->data->mcolor;
  1941. X              }
  1942. X!         break;
  1943. X          case AT_OBJ:
  1944. X              if (let == GOLD_SYM)
  1945. X              typ = HI_GOLD;
  1946. X!             else if (level.objects[x][y] && 
  1947. X!                let == objects[level.objects[x][y]->otyp].oc_olet)
  1948. X!             typ = objects[level.objects[x][y]->otyp].oc_color;
  1949. X              else
  1950. X              typ = mimic_color(let);
  1951. X              break;
  1952. X          case AT_MAP:
  1953. X              if ( ((let == POOL_SYM && IS_POOL(levl[x][y].typ))
  1954. X--- 1248,1275 ----
  1955. X                  default:
  1956. X                  if (u.ux == x && u.uy == y)
  1957. X                  typ = uasmon->mcolor;
  1958. X!                 else if (level.monsters[x][y])
  1959. X                      typ = level.monsters[x][y]->data->mcolor;
  1960. X+                 else
  1961. X+                 typ = 0;
  1962. X              }
  1963. X!             break;
  1964. X          case AT_OBJ:
  1965. X+             { struct obj *otmp;
  1966. X+ 
  1967. X              if (let == GOLD_SYM)
  1968. X              typ = HI_GOLD;
  1969. X!             else if ((otmp = level.objects[x][y]) && 
  1970. X!                let == objects[otmp->otyp].oc_olet) {
  1971. X!             if (otmp->otyp == CORPSE ||
  1972. X!                 otmp->otyp == DRAGON_SCALE_MAIL)
  1973. X!                 typ = mons[otmp->corpsenm].mcolor;
  1974. X!             else
  1975. X!                 typ = objects[level.objects[x][y]->otyp].oc_color;
  1976. X!             }
  1977. X              else
  1978. X              typ = mimic_color(let);
  1979. X+             }
  1980. X              break;
  1981. X          case AT_MAP:
  1982. X              if ( ((let == POOL_SYM && IS_POOL(levl[x][y].typ))
  1983. X***************
  1984. X*** 1190,1195 ****
  1985. X--- 1284,1292 ----
  1986. X                  && hilites[HI_GOLD] != HI)
  1987. X              typ = HI_GOLD;
  1988. X  #endif
  1989. X+             else if (levl[x][y].typ == ROOM && levl[x][y].icedpool
  1990. X+                 && hilites[CYAN] != HI)
  1991. X+             typ = CYAN;
  1992. X              else
  1993. X              typ = 0;
  1994. X              break;
  1995. X*** src/Old/priest.c    Sun Nov 19 13:08:13 1989
  1996. X--- src/priest.c    Wed Nov  8 22:56:57 1989
  1997. X***************
  1998. X*** 147,153 ****
  1999. X      gy += rn1(3,-1);
  2000. X  
  2001. X      if(!priest->mpeaceful) {
  2002. X!         if(dist(omx,omy) < 3) {
  2003. X              if(Displaced)
  2004. X                  Your("displaced image doesn't fool %s!",
  2005. X                      mon_nam(priest));
  2006. X--- 147,153 ----
  2007. X      gy += rn1(3,-1);
  2008. X  
  2009. X      if(!priest->mpeaceful) {
  2010. X!         if(monnear(priest, u.ux, u.uy)) {
  2011. X              if(Displaced)
  2012. X                  Your("displaced image doesn't fool %s!",
  2013. X                      mon_nam(priest));
  2014. X*** src/Old/prisym.c    Sun Nov 19 13:08:35 1989
  2015. X--- src/prisym.c    Fri Nov 17 19:32:10 1989
  2016. X***************
  2017. X*** 1,4 ****
  2018. X! /*    SCCS Id: @(#)prisym.c    3.0    88/11/09
  2019. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  2020. X  /* NetHack may be freely redistributed.  See license for details. */
  2021. X  
  2022. X--- 1,4 ----
  2023. X! /*    SCCS Id: @(#)prisym.c    3.0    89/11/15
  2024. X  /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
  2025. X  /* NetHack may be freely redistributed.  See license for details. */
  2026. X  
  2027. X***************
  2028. X*** 8,14 ****
  2029. X  #include "wseg.h"
  2030. X  #include "lev.h"
  2031. X  
  2032. X! static void pwseg P((struct wseg *));
  2033. X  #endif
  2034. X  
  2035. X  void
  2036. X--- 8,14 ----
  2037. X  #include "wseg.h"
  2038. X  #include "lev.h"
  2039. X  
  2040. X! static void FDECL(pwseg, (struct wseg *));
  2041. X  #endif
  2042. X  
  2043. X  void
  2044. X***************
  2045. X*** 164,170 ****
  2046. X--- 164,175 ----
  2047. X  void
  2048. X  curs_on_u()
  2049. X  {
  2050. X+ #ifdef CLIPPING
  2051. X+     cliparound(u.ux, u.uy);
  2052. X+     (void)win_curs(u.ux, u.uy);
  2053. X+ #else
  2054. X      curs(u.ux, u.uy+2);
  2055. X+ #endif
  2056. X  }
  2057. X  
  2058. X  void
  2059. X***************
  2060. X*** 194,199 ****
  2061. X--- 199,205 ----
  2062. X  /* print a position that is visible for @ */
  2063. X  void
  2064. X  prl(x,y)
  2065. X+ int x, y;
  2066. X  {
  2067. X      register struct rm *room;
  2068. X      register struct monst *mtmp = (struct monst *)0;
  2069. X***************
  2070. X*** 278,284 ****
  2071. X      else if(ttmp && ttmp->tseen) tmp = TRAP_SYM;
  2072. X      else switch(room->typ) {
  2073. X      case SCORR:
  2074. X!         tmp = STONE_SYM;
  2075. X          break;
  2076. X      case SDOOR:
  2077. X          croom = inroom(x,y);
  2078. X--- 284,290 ----
  2079. X      else if(ttmp && ttmp->tseen) tmp = TRAP_SYM;
  2080. X      else switch(room->typ) {
  2081. X      case SCORR:
  2082. X!         tmp = ' ';    /* _not_ STONE_SYM! */
  2083. X          break;
  2084. X      case SDOOR:
  2085. X          croom = inroom(x,y);
  2086. X***************
  2087. X*** 323,329 ****
  2088. X          tmp = BRCORN_SYM;
  2089. X          break;
  2090. X      case DOOR:
  2091. X!         tmp = DOOR_SYM;
  2092. X          break;
  2093. X      case CORR:
  2094. X          tmp = CORR_SYM;
  2095. X--- 329,355 ----
  2096. X          tmp = BRCORN_SYM;
  2097. X          break;
  2098. X      case DOOR:
  2099. X!         if (room->doormask == D_NODOOR || room->doormask & D_BROKEN)
  2100. X!             tmp = NO_DOOR_SYM;
  2101. X!         else if (room->doormask & (D_CLOSED|D_LOCKED))
  2102. X!             tmp = CLOSED_DOOR_SYM;
  2103. X!         /* We know door is open. */
  2104. X!         else {
  2105. X!             croom=inroom(x,y);
  2106. X!             if(croom == -1) {
  2107. X! #ifdef STRONGHOLD
  2108. X!             if(IS_WALL(levl[x-1][y].typ)||IS_WALL(levl[x+1][y].typ))
  2109. X!                 tmp = H_OPEN_DOOR_SYM;
  2110. X!             else
  2111. X!                 tmp = V_OPEN_DOOR_SYM;
  2112. X! #else
  2113. X!             impossible("door %d %d not in room",x,y);
  2114. X! #endif
  2115. X!             } else if(rooms[croom].ly<=y && y<=rooms[croom].hy)
  2116. X!             tmp = V_OPEN_DOOR_SYM;
  2117. X!             else
  2118. X!             tmp = H_OPEN_DOOR_SYM;
  2119. X!         }
  2120. X          break;
  2121. X      case CORR:
  2122. X          tmp = CORR_SYM;
  2123. X***************
  2124. X*** 424,430 ****
  2125. X  
  2126. X      if(!isok(x,y)) return;
  2127. X      room = &levl[x][y];
  2128. X!     if(room->scrsym == ROOM_SYM && !room->lit && !Blind) {
  2129. X          room->scrsym = STONE_SYM;    /* was ' ' -- OIS */
  2130. X          room->new = 1;
  2131. X          on_scr(x,y);
  2132. X--- 450,457 ----
  2133. X  
  2134. X      if(!isok(x,y)) return;
  2135. X      room = &levl[x][y];
  2136. X!     if(IS_FLOOR(levl[x][y].typ)
  2137. X!        && !room->lit && !Blind) {
  2138. X          room->scrsym = STONE_SYM;    /* was ' ' -- OIS */
  2139. X          room->new = 1;
  2140. X          on_scr(x,y);
  2141. X***************
  2142. X*** 484,493 ****
  2143. X      if(x == u.ux && y == u.uy && !Invisible) return(1);
  2144. X  
  2145. X      if(MON_AT(x, y))
  2146. X!         if (Blind && Telepat || canseemon(m_at(x,y)))
  2147. X!             return(1);
  2148. X!         else return ((HTelepat & WORN_HELMET) &&
  2149. X!                  (dist(x, y) <= (BOLT_LIM * BOLT_LIM)));
  2150. X      return(0);
  2151. X  }
  2152. X  
  2153. X--- 511,517 ----
  2154. X      if(x == u.ux && y == u.uy && !Invisible) return(1);
  2155. X  
  2156. X      if(MON_AT(x, y))
  2157. X!         return(showmon(m_at(x,y)));
  2158. X      return(0);
  2159. X  }
  2160. X  
  2161. X***************
  2162. X*** 539,541 ****
  2163. X--- 563,664 ----
  2164. X      }
  2165. X  }
  2166. X  #endif
  2167. X+ 
  2168. X+ 
  2169. X+ #ifdef STUPID_CPP    /* otherwise these functions are macros in rm.h */
  2170. X+ boolean IS_WALL(typ)
  2171. X+ unsigned typ;
  2172. X+ {
  2173. X+     return(typ && typ <= TRWALL);
  2174. X+ }
  2175. X+ 
  2176. X+ boolean IS_STWALL(typ)
  2177. X+ unsigned typ;
  2178. X+ {
  2179. X+     return(typ <= TRWALL);            /* STONE <= (typ) <= TRWALL */
  2180. X+ }
  2181. X+ 
  2182. X+ boolean IS_ROCK(typ)
  2183. X+ unsigned typ;
  2184. X+ {
  2185. X+     return(typ < POOL);            /* absolutely nonaccessible */
  2186. X+ }
  2187. X+ 
  2188. X+ boolean IS_DOOR(typ)
  2189. X+ unsigned typ;
  2190. X+ {
  2191. X+     return(typ == DOOR);
  2192. X+ }
  2193. X+ 
  2194. X+ boolean IS_FLOOR(typ)
  2195. X+ unsigned typ;
  2196. X+ {
  2197. X+     return(typ == ROOM);
  2198. X+ }
  2199. X+ 
  2200. X+ boolean ACCESSIBLE(typ)
  2201. X+ unsigned typ;
  2202. X+ {
  2203. X+     return(typ >= DOOR);            /* good position */
  2204. X+ }
  2205. X+ 
  2206. X+ boolean IS_ROOM(typ)
  2207. X+ unsigned typ;
  2208. X+ {
  2209. X+     return(typ >= ROOM);            /* ROOM, STAIRS, furniture.. */
  2210. X+ }
  2211. X+ 
  2212. X+ boolean ZAP_POS(typ)
  2213. X+ unsigned typ;
  2214. X+ {
  2215. X+     return(typ >= POOL);
  2216. X+ }
  2217. X+ 
  2218. X+ boolean SPACE_POS(typ)
  2219. X+ unsigned typ;
  2220. X+ {
  2221. X+     return(typ > DOOR);
  2222. X+ }
  2223. X+ 
  2224. X+ boolean IS_POOL(typ)
  2225. X+ unsigned typ;
  2226. X+ {
  2227. X+     return(typ >= POOL && typ <= DRAWBRIDGE_UP);
  2228. X+ }
  2229. X+ 
  2230. X+ boolean IS_THRONE(typ)
  2231. X+ unsigned typ;
  2232. X+ {
  2233. X+     return(typ == THRONE);
  2234. X+ }
  2235. X+ 
  2236. X+ boolean IS_FOUNTAIN(typ)
  2237. X+ unsigned typ;
  2238. X+ {
  2239. X+     return(typ == FOUNTAIN);
  2240. X+ }
  2241. X+ 
  2242. X+ boolean IS_SINK(typ)
  2243. X+ unsigned typ;
  2244. X+ {
  2245. X+     return(typ == SINK);
  2246. X+ }
  2247. X+ 
  2248. X+ boolean IS_ALTAR(typ)
  2249. X+ unsigned typ;
  2250. X+ {
  2251. X+     return(typ == ALTAR);
  2252. X+ }
  2253. X+ 
  2254. X+ boolean IS_DRAWBRIDGE(typ)
  2255. X+ unsigned typ;
  2256. X+ {
  2257. X+     return(typ == DRAWBRIDGE_UP || typ == DRAWBRIDGE_DOWN);
  2258. X+ }
  2259. X+ 
  2260. X+ boolean IS_FURNITURE(typ)
  2261. X+ unsigned typ;
  2262. X+ {
  2263. X+     return(typ >= STAIRS && typ <= ALTAR);
  2264. X+ }
  2265. X+ #endif /* STUPID_CPP */
  2266. END_OF_FILE
  2267. if test 55338 -ne `wc -c <'patches06j'`; then
  2268.     echo shar: \"'patches06j'\" unpacked with wrong size!
  2269. fi
  2270. # end of 'patches06j'
  2271. fi
  2272. echo shar: End of archive 4 \(of 15\).
  2273. cp /dev/null ark4isdone
  2274. MISSING=""
  2275. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do
  2276.     if test ! -f ark${I}isdone ; then
  2277.     MISSING="${MISSING} ${I}"
  2278.     fi
  2279. done
  2280. if test "${MISSING}" = "" ; then
  2281.     echo You have unpacked all 15 archives.
  2282.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2283. else
  2284.     echo You still need to unpack the following archives:
  2285.     echo "        " ${MISSING}
  2286. fi
  2287. ##  End of shell archive.
  2288. exit 0
  2289.